package cc.itstone.subject.infra.basic.service.impl;

import cc.itstone.subject.infra.basic.entity.SubjectCategory;
import cc.itstone.subject.infra.basic.mapper.SubjectCategoryMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cc.itstone.subject.infra.basic.service.SubjectCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 * @description 针对表【subject_category(题目分类)】的数据库操作Service实现
 * @createDate 2023-11-15 22:31:28
 */
@Service
public class SubjectCategoryServiceImpl extends ServiceImpl<SubjectCategoryMapper, SubjectCategory>
        implements SubjectCategoryService {

    @Resource
    private SubjectCategoryMapper subjectCategoryMapper;

    /**
     * 添加题目分类
     */
    @Override
    public void insert(SubjectCategory subjectCategory) {
        subjectCategory.setCreatedTime(new Date());
        subjectCategoryMapper.insert(subjectCategory);
    }

    /**
     * 查询岗位大类
     */
    @Override
    public List<SubjectCategory> queryCategory(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.queryCategory(subjectCategory);
    }
}




